﻿const express = require('express');
const router = express.Router();
const fs = require("fs");
const multer = require('multer');
const moment = require('moment');
const http = require('http');
const ScoreSegmentModel = require('../models/score-segment');
const ScoreSubItemModel = require('../models/score-sub-item');
const createGuid = require('../lib/util').createGuid;
const dateToString = require('../lib/util').dateToString;


const upload = multer({ dest: './public/cover' });
const upload2 = multer({ dest: './public/img' });


// 获取某个班级的成绩环节列表
router.get('/list/:classGuid', function(req, res, next) {
    let classGuid = req.params.classGuid;
    ScoreSegmentModel.getListByClassGuid(classGuid, function(status, vals){
        res.send({ status: status, data: vals });
    });
});

module.exports = router;